<!-- 确保这是文件的第一行 -->
<template>
  <view class="container">
    <!-- 顶部地址栏 -->
    <view class="address-bar">
      <text class="address-text">焦作市山阳区人民路32号</text>
    </view>

    <!-- 服务图标区域 -->
    <view class="service-grid">
      <view class="service-item" @click="navigateTo('vehicleRepair')">
        <image src="/static/order/car.png" class="service-icon"></image>
        <text class="service-text">车辆维修</text>
      </view>
      
      <view class="service-item" @click="navigateTo('carMaintenance')">
        <image src="/static/order/car.png" class="service-icon"></image>
        <text class="service-text">汽车保养</text>
      </view>
      
      <view class="service-item" @click="navigateTo('carWash')">
        <image src="/static/order/car.png" class="service-icon"></image>
        <text class="service-text">专业洗车</text>
      </view>
      
      <view class="service-item" @click="navigateTo('nearbyGas')">
        <image src="/static/order/car.png" class="service-icon"></image>
        <text class="service-text">就近加油</text>
      </view>
    </view>

    <!-- 附近加油站标题 -->
    <view class="section-title">
      <text>附近加油站</text>
    </view>

   
  </view>
</template>

<script setup>
import { ref } from 'vue';



// 当前选中的标签页
const currentTab = ref('home');

// 跳转到对应服务页面
const navigateTo = (page) => {
  let url = '';
  switch(page) {
    case 'vehicleRepair':
      url = '/pages/order/service/vehicleRepair';
      break;
    case 'carMaintenance':
      url = '/pages/order/service/carMaintenance';
      break;
    case 'carWash':
      url = '/pages/order/service/carWash';
      break;
    case 'nearbyGas':
      url = '/pages/order/service/nearbyGas';
      break;
  }
  uni.navigateTo({
    url: url
  });
};















</script>

<style>
/* 全局样式 */
page {
  background-color: #f5f5f5;
  height: 100%;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-bottom: 100rpx; /* 给底部导航留空间 */
}

/* 地址栏样式 */
.address-bar {
  padding: 20rpx 30rpx;
  background-color: #fff;
  border-bottom: 1rpx solid #eee;
}

.address-text {
  font-size: 28rpx;
  color: #333;
}

/* 服务图标网格 */
.service-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 30rpx 0;
  background-color: #fff;
  margin: 20rpx;
  border-radius: 16rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 25%;
  padding: 20rpx 0;
}

.service-icon {
  width: 80rpx;
  height: 80rpx;
  margin-bottom: 10rpx;
}

.service-text {
  font-size: 24rpx;
  color: #333;
}

/* 分区标题 */
.section-title {
  padding: 20rpx 30rpx;
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
  background-color: #fff;
  margin-top: 20rpx;
}


</style>